﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="CheckOut.aspx.cs" Inherits="SWEN_HMS.BookingModule.CheckOut" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    </asp:Content>
<asp:Content ID="Content5" runat="server" contentplaceholderid="pageTitlePHolder">
    <span class="auto-style1">Check-Out Room<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    </span>
</asp:Content>
<asp:Content ID="Content6" runat="server" contentplaceholderid="ContentPlaceHolder1">
    
        <table>
            <tr>
                <td>Room No</td>
                <td>:</td>
                <td>
                    <asp:TextBox ID="tbxRoomNo" runat="server" CausesValidation="True" MaxLength="3" Width="50px"></asp:TextBox>
                    <asp:Button ID="btnSearch" runat="server" CssClass="btnCSS" Enabled="False" OnClick="btnSearch_Click" Text="Search" />
                </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbxRoomNo" Enabled="False" ErrorMessage="Please enter Room Number!"></asp:RequiredFieldValidator>
                </td>
            </tr>
        </table>
    <asp:Panel ID="Panel1" runat="server" CssClass="newStyle1">
        <br />
            <table>
                <tr>
                    <td>Guest&#39;s Name</td>
                    <td>:</td>
                    <td>
                        <asp:Label ID="lblGuestName" runat="server" ForeColor="Black" style="font-weight: 700"></asp:Label>
                    </td>
                    <td></td>
                    <td>Invoice ID</td>
                    <td>:</td>
                    <td>
                        <asp:Label ID="lblInvoiceID" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>Check-In Date</td>
                    <td>:</td>
                    <td>
                        <asp:Label ID="lblCheckInDate" runat="server" ForeColor="Black" style="font-weight: 700"></asp:Label>
                    </td>
                    <td></td>
                    <td>Initial Check-Out Date</td>
                    <td>:</td>
                    <td>
                        <asp:Label ID="lblCheckOut" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>Payment Mode</td>
                    <td></td>
                    <td>
                        <asp:Label ID="lblPaymentMode" runat="server"></asp:Label>
                    </td>
                    <td></td>
                    <td>Final Check-Out Date</td>
                    <td>:</td>
                    <td>
                        <asp:Label ID="lblFinalCO" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>Room Number:</td>
                    <td>:</td>
                    <td>
                        <asp:Label ID="lblRoomNumber" runat="server"></asp:Label>
                    </td>
                    <td>&nbsp;</td>
                    <td>Booking ID</td>
                    <td>:</td>
                    <td>
                        <asp:Label ID="lblBookingID" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td colspan="7">Payments due before Checkout:
                        <asp:Label ID="Label1" runat="server"></asp:Label>
                    </td>
                </tr>
            </table>
        </asp:Panel>
            <br />
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="itemID" Width="800px">
                <Columns>
                    <asp:TemplateField HeaderText="S/No">
                        <ItemTemplate>
                            <%# Container.DataItemIndex+1+"." %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Description">
                        <ItemTemplate>
                            <%#Eval("description") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Quantity">
                        <ItemTemplate>
                            <%#Eval("quantity") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Unit Price">
                        <ItemTemplate>
                            <%#Eval("unitPrice") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Total Amount">
                        <ItemTemplate>
                            <%#Eval("totalPrice") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <br />
        <asp:Panel ID="Panel2" runat="server">
            <table
                <tr>
                    <td>Sub-Total (S$):</td>
                    <td>
                        <asp:Label ID="Label3" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>GST (7%):</td>
                    <td>
                        <asp:Label ID="Label4" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>Grand Total (S$):</td>
                    <td><strong><span>
                        <asp:Label ID="Label2" runat="server" style="color: #FF0000"></asp:Label>
                        </span></strong></td>
                </tr>
            </table>
        </asp:Panel>
        <%--</asp:Panel>--%>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <br />
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:Button ID="Button1" runat="server" CssClass="btnCSS" OnClick="Button1_Click" Text="Check Out &amp; Generate Invoice" />
        <asp:Button ID="Button2" runat="server" CssClass="btnCSS" Enabled="False" OnClick="Button2_Click" Text="Print Preview" Visible="False" />
        <asp:Button ID="Button3" runat="server" CausesValidation="False" CssClass="btnCSS" OnClick="Button3_Click" Text="Return to Room Status Page" />
</asp:Content>

